<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close" append-to-body>
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="disableEditSubmit">
			<el-row>
        <el-col :span="12">
          <el-form-item label="填写时间" prop="finishwritetime">
            <el-date-picker v-model="model.finishwritetime" type="date" value-format="yyyy-MM-dd" :disabled="true"></el-date-picker>
          </el-form-item>
        </el-col>
				<el-col :span="12">
					<el-form-item label="客户决策链支持度" prop="clientsupport" :rules="rules.validateRequire">
						<el-input v-model="model.clientsupport"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="客户决策模式" prop="decisionmode" :rules="rules.validateRequire">
						<el-input v-model="model.decisionmode" type="textarea" maxlength="1000" show-word-limit :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="disableEditSubmit === false">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: { },
  data() {
    return {
      moduleTitle: '项目立项-客户决策',
      urlPrefix: '/mpm/projectCustomerDecision/',
      url: {
        // 额外的url
      }
    }
  },
  props: {
    projectid: {
      type: Number,
      default: 0
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
      this.$set(this.model, 'finishwritetime', new Date())
    },
    assignDefaultValue() {
        this.$set(this.model, 'projectid', this.projectid)
    }
  }
}
</script>
